﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TicketsPhone.Domain.Utils;
using TicketsPhone.Entidades;

namespace TicketsPhone.Domain.Entities
{
    public class Horario
    {
        public Horario()
        {
            Sucursal = new SucursalRelacional();
            CajerosActivos = 0;
        }

        public Horario(Horario hora)
        {
            this.CajerosActivos = hora.CajerosActivos;
            this.Dia = hora.Dia;
            this.HoraFin = hora.HoraFin;
            this.HoraInicio = hora.HoraInicio;
            this.Sucursal = hora.Sucursal;
        }

        public string ToString(string formato)
        {
            switch (formato)
            {
                case "dd-hh":
                    return string.Format("{0}-{1}", DiaEspanol(this.Dia), this.HoraInicio);
                default:
                    return this.ToString();
            }
        }

        public string DiaEspanol(DayOfWeek dia)
        {
            switch (dia)
            {
                case DayOfWeek.Friday:
                    return "Viernes";
                case DayOfWeek.Monday:
                    return "Lunes";
                case DayOfWeek.Saturday:
                    return "Sabado";
                case DayOfWeek.Sunday:
                    return "Domingo";
                case DayOfWeek.Thursday:
                    return "Jueves";
                case DayOfWeek.Tuesday:
                    return "Martes";
                case DayOfWeek.Wednesday:
                    return "Miercoles";
                default:
                    return "";
            }
        }


        public int IdHorario { get; set; }
        public SucursalRelacional Sucursal { get; set; }
        public DayOfWeek Dia { get; set; }
        public Hora HoraInicio { get; set; }
        public Hora HoraFin { get; set; }
        public int CajerosActivos { get; set; }
        
        
    }


}
